package com.bookstore.entity;

import java.io.Serializable;
import java.util.Objects;

public class Notice implements Serializable {
    private static final long serialVersionUID = 1L;
    //公告ID
    private Long noticeId;
    //公告标题
    private String title;
    //公告内容
    private String details;
    //公告创建时间
    private String noticeTime;

    public Notice(Long noticeId, String title, String details, String noticeTime) {
        this.noticeId = noticeId;
        this.title = title;
        this.details = details;
        this.noticeTime = noticeTime;
    }

    public Notice() {
    }

    @Override
    public String toString() {
        return "Notice{" +
                "noticeId=" + noticeId +
                ", title='" + title + '\'' +
                ", details='" + details + '\'' +
                ", noticeTime='" + noticeTime + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Notice notice = (Notice) o;
        return Objects.equals(noticeId, notice.noticeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(noticeId);
    }

    public Long getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(Long noticeId) {
        this.noticeId = noticeId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public String getNoticeTime() {
        return noticeTime;
    }

    public void setNoticeTime(String noticeTime) {
        this.noticeTime = noticeTime;
    }
}
